home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 16 / columns2.zip / COLUMNS.BAS next >
BASIC Source File  |  1986-03-25  |  15KB  |  551 lines

  1. 101 ' ========================================================
  2. 102 ' 
  3. 103 ' Columns is a program that will re-assemble a text file
  4. 104 ' into columns either on printer or disk.  The original
  5. 105 ' code for the program was written by Steve Rimmer, of
  6. 106 ' COMPUTING NOW! magazine for an article in the March,
  7. 107 ' 1986 issue.  Rimmer's code was reworked and fancied
  8. 108 ' up by Brian Hillis, to provide more friendliness and
  9. 109 ' flexibility.
  10. 110 '
  11. 111 ' If you have any comments and/or suggestions, please
  12. 112 ' contact:
  13. 113 '                
  14. 114 '                Brian Hillis
  15. 115 '                240 Scarlett Rd.
  16. 116 '                Suite 313
  17. 117 '                Toronto, Ontario
  18. 118 '                M6N 4X4
  19. 119 '                Canada
  20. 120 '                (416) 769-2251
  21. 121 '
  22. 122 ' ========================================================
  23. 123 '
  24. 124 DEFINT A-Z
  25. 125 DIM GA$(255),HL$(5),FL$(5)
  26. 126 '
  27. 127 ' This routine checks to see if you are using a color or
  28. 128 ' monochrome monitor.  It is important to know which you
  29. 129 ' are using in order to set the correct display atributes.
  30. 130 '
  31. 131 DEF SEG=0
  32. 132 M=PEEK(1040) AND 48
  33. 133   IF M=48 THEN SCR=0:L=&HB000:GOTO 136
  34. 134 SCR=1
  35. 135 L=&HB800
  36. 136 DEF SEG=L
  37. 137   IF SCR=0 THEN TA=7:TB=8:TC=24:TD=16:BA=0:BB=1
  38. 138   IF SCR=1 THEN TA=7:TB=7:TC=7:TD=7:BA=0:BB=0
  39. 139 '
  40. 140 ' Now we have to declare a few values for various flags,
  41. 141 ' displays, and input routines.
  42. 142 '
  43. 143 FALSE=0
  44. 144 TRUE=NOT FALSE
  45. 145 ESC$=CHR$(27)
  46. 146 LO$="abcdefghijklmnopqrstuvwxyz"
  47. 147 UP$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  48. 148 NU$="0123456789"
  49. 149 FF=TRUE
  50. 150 WIDTH "LPT1:",175
  51. 151 RU$="----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2----+----3----+"
  52. 152 '
  53. 153 ' This takes us to the opening screen and menu selections
  54. 154 ' needed to set up the program.
  55. 155 '
  56. 156 GOSUB 382
  57. 157 TA=5
  58. 158 '
  59. 159 ' This is where COLUMNS starts figuring out how much data
  60. 160 ' to put on each line, based on the information you
  61. 161 ' entered during the initial menu selection.  COLUMNS will
  62. 162 ' also give you a running display on the top line of your
  63. 163 ' screen to let you know the status of its work.
  64. 164 '
  65. 165 GOSUB 225
  66. 166 ' 
  67. 167 ' This is the end of the program.
  68. 168 '
  69. 169 SCREEN 0
  70. 170 WIDTH 80
  71. 171 LOCATE,,1
  72. 172 CLS
  73. 173 END
  74. 174 '
  75. 175 ' This is the keyboard input routine.  It checks to make
  76. 176 ' your input qualifies as the type of input expected.  In
  77. 177 ' other words, if COLUMNS is expecting a number, it won't
  78. 178 ' let you enter an alpha character.
  79. 179 '
  80. 180 LOCATE,,1
  81. 181 C$=""
  82. 182 B$=""
  83. 183 '
  84. 184 ' Accept input as long as it's not a carriage return.
  85. 185 '
  86. 186   WHILE B$<>CHR$(13)
  87. 187 '
  88. 188 ' Look for input from the keyboard
  89. 189 '
  90. 190     B$=INPUT$(1)
  91. 191 ' 
  92. 192 ' if the input is not one of the eligible characters,
  93. 193 ' go back and wait for another one.
  94. 194 '
  95. 195     IF INSTR(M$+CHR$(8)+CHR$(13),B$)=0 THEN 190
  96. 196 '
  97. 197 ' These lines deal with the DELETE key.
  98. 198 '
  99. 199     IF B$=CHR$(8) AND LEN(C$)<1 THEN 190
  100. 200     IF B$=CHR$(8) THEN PRINT CHR$(29);" ";CHR$(29);:C$=LEFT$(C$,LEN(C$)-1):GOTO 190
  101. 201 '
  102. 202 ' If it's an eligible character, and NOT a carriage 
  103. 203 ' return, then print it on the screen and save it
  104. 204 ' on the end of the variable C$.  Then go back and wait
  105. 205 ' for another input.
  106. 206 '
  107. 207     IF B$<>CHR$(13) AND LEN(C$)<ENT THEN C$=C$+B$:PRINT B$;
  108. 208   WEND
  109. 209 '
  110. 210 ' When we finally get a carriage return, chop it off
  111. 211 ' the end, and send C$ back to where it's needed.
  112. 212 '
  113. 213 IF RIGHT$(C$,1)=CHR$(13) THEN C$=LEFT$(C$,LEN(C$)-1)
  114. 214 LOCATE,,0
  115. 215 RETURN
  116. 216 '
  117. 217 ' This is where COLUMNS figures out how wide to make each
  118. 218 ' column, how many lines to a page, and some other fancy
  119. 219 ' stuff.  First the number of column lines is calculated
  120. 220 ' and stored in GD.  Then the page number is calculated
  121. 221 ' and converted to a string (it's easier to deal with at
  122. 222 ' printing time).  Finally the array containing the lines
  123. 223 ' of text is cleared.
  124. 224 '
  125. 225 GD=PC*(PD-H-F-AF-2)
  126. 226 PN=PN+1
  127. 227 PN$=RIGHT$(STR$(PN),LEN(STR$(PN))-1)
  128. 228   FOR X=1 TO 255
  129. 229     GA$(X)=""
  130. 230   NEXT X
  131. 231 PS=0
  132. 232 PD=PDD
  133. 233 '
  134. 234 ' Now COLUMNS goes into your text file and starts
  135. 235 ' gathering characters to make up the column lines.
  136. 236 '
  137. 237   FOR X=1 TO GD
  138. 238     GOSUB 339
  139. 239     GA$(X)=T$
  140. 240     IF NOT FF THEN X=GD
  141. 241 ' 
  142. 242 ' While COLUMNS is assembling lines of text, it keeps you
  143. 243 ' informed of its progress.
  144. 244 '
  145. 245     LOCATE 1,1,0
  146. 246     PRINT "Assembling Page ";
  147. 247     COLOR TB,BB
  148. 248     PRINT PN$;
  149. 249     COLOR TA,BA
  150. 250     X$=RIGHT$(STR$(X),LEN(STR$(X))-1)
  151. 251     LOCATE 1,20,0
  152. 252     PRINT "- Line ";
  153. 253     COLOR TB,BB
  154. 254     PRINT X$;
  155. 255     COLOR TA,BA
  156. 256     PRINT "     "
  157. 257     FLN$=RIGHT$(STR$(FLN!),LEN(STR$(FLN!))-1)
  158. 258     LOCATE 1,40,0
  159. 259     COLOR TB,BB
  160. 260     PRINT FLN$;
  161. 261     COLOR TA,BA
  162. 262     PRINT " Bytes Remaining.    "
  163. 263 '
  164. 264 ' If you asked COLUMNS to display the assembly process
  165. 265 ' this is where it happens.  It will display 21 new lines
  166. 266 ' then start scrolling.  It's slow writing to the screen
  167. 267 ' but it's worth looking at if you think there might be
  168. 268 ' a problem with the assembly.
  169. 269 '
  170. 270     LOCATE 3,1,0
  171. 271     IF X<20 THEN Y=1 ELSE Y=X-20
  172. 272       FOR Z=Y TO X
  173. 273         IF D=1 THEN PRINT GA$(Z);"|"
  174. 274       NEXT Z
  175. 275   NEXT X
  176. 276 '
  177. 277 ' This is where COLUMNS prints your new file either to
  178. 278 ' your printer or disk, depending on what you specified
  179. 279 ' during the opening selections.  If it prints to disk
  180. 280 ' it will create a new file on the CURRENT directory of
  181. 281 ' the drive that contained the original text file.  Each
  182. 282 ' new page is named PAGE-1, PAGE-2, etc.
  183. 283 '
  184. 284 IF NOT PF THEN OPEN "O",#2,DR$+"PAGE-"+PN$ ELSE OPEN "LPT1:" AS 2
  185. 285 '
  186. 286 ' Print the correct printer codes.
  187. 287 '
  188. 288 PRINT #2,PI$;
  189. 289 '
  190. 290 ' Calculate how much of the page is available for
  191. 291 ' text lines.
  192. 292 '
  193. 293 PS=H+1
  194. 294 PF=F+1
  195. 295 PD=PD-PS-PF
  196. 296 '
  197. 297 ' If there are header lines, then print them.  Otherwise,
  198. 298 ' skip to the next part.
  199. 299 '
  200. 300 IF H<1 THEN 309
  201. 301   FOR X=1 TO H
  202. 302     PRINT #2,HL$(X);CHR$(13);CHR$(10);
  203. 303   NEXT
  204. 304 PRINT #2,CHR$(13);CHR$(10);
  205. 305 '
  206. 306 ' Start printing the correct column lines side by side
  207. 307 ' on the same line.
  208. 308 '
  209. 309   FOR X=1 TO PD
  210. 310       FOR Y=1 TO PC
  211. 311         PRINT #2,GA$(X+(PD*(Y-1)));
  212. 312         IF Y<PC THEN PRINT #2,SPACE$(PG);
  213. 313       NEXT Y
  214. 314     PRINT #2,CHR$(13);CHR$(10);
  215. 315   NEXT X
  216. 316 PRINT #2,CHR$(13);CHR$(10);
  217. 317 '
  218. 318 ' If no footer line has been specified, print the
  219. 319 ' page number at the bottom of the page.  Otherwise,
  220. 320 ' print the footer lines.
  221. 321 '
  222. 322 IF F>0 THEN 323 ELSE PRINT #2,SPACE$((PW-10)/2) "- Page "PN$" -"
  223. 323 PRINT
  224. 324   FOR X=1 TO F
  225. 325     PRINT #2,FL$(X);CHR$(13);CHR$(10);
  226. 326   NEXT
  227. 327 PRINT #2,CHR$(12);
  228. 328 CLOSE #2
  229. 329 ' 
  230. 330 ' If there is still anything left in the original text
  231. 331 ' file, start assembling another page.
  232. 332 '
  233. 333 IF FF THEN 226
  234. 334 RETURN
  235. 335 ' 
  236. 336 ' This is where COLUMNS goes into your source file and
  237. 337 ' starts assembling new lines of text.
  238. 338 '
  239. 339 GW=INT(((PW-PC)/PC)-((PC-1)*PG/PC))
  240. 340 B=0
  241. 341 L=0
  242. 342 T$=H$
  243. 343   WHILE (B<>&HD) AND (B<>&H8D) AND (L<=GW) AND FF
  244. 344     IF EOF(1) THEN FF=FALSE:GOTO 343
  245. 345     B$=INPUT$(1,1)
  246. 346     B=ASC(B$)
  247. 347     FLN!=FLN!-1
  248. 348     IF FLN!>0 THEN FF=TRUE
  249. 349 '
  250. 350 ' Just in case your source file was created in WORDSTAR,
  251. 351 ' COLUMNS will correct all the high bits to make it read
  252. 352 ' properly.
  253. 353 '
  254. 354     GOSUB 372
  255. 355     T$=T$+B$
  256. 356     L=LEN(T$)
  257. 357     IF B$<>"" THEN P=ASC(B$)
  258. 358   WEND
  259. 359 B$=""
  260. 360 H$=""
  261. 361   WHILE B$<>" " AND L>0
  262. 362     B$=MID$(T$,L,1)
  263. 363     IF B$<>" " THEN H$=B$+H$:MID$(T$,L,1)=" ":L=L-1
  264. 364   WEND
  265. 365 IF H$=" " THEN H$=""
  266. 366 IF LEFT$(T$,1)="." THEN 339
  267. 367 RETURN
  268. 368 '
  269. 369 ' This is the routine to convert WORDSTAR characters
  270. 370 ' to normal ASCII characters.
  271. 371 '
  272. 372 IF (L=0) AND (B=32) THEN B$=""
  273. 373 IF B=&HA0 THEN B$=""
  274. 374 IF (B=&H8D) AND (P<>32) THEN B$=" ":B=0
  275. 375 IF (B=&H8D) AND (P=32) THEN B$="":B=0
  276. 376 IF B>127 THEN B=B-128
  277. 377 IF B<32 THEN B$=""
  278. 378 IF B=9 THEN B$=SPACE$(TA)
  279. 379 IF B=13 THEN B$=SPACE$(1+(GW-L))
  280. 380 IF B=>32 THEN B$=CHR$(B)
  281. 381 RETURN
  282. 382 CLS
  283. 383 KEY OFF
  284. 384 COLOR TB,BB
  285. 385 LOCATE 1,1
  286. 386 PRINT CHR$(201);
  287. 387 PRINT STRING$(77,205);
  288. 388 PRINT CHR$(187)
  289. 389   FOR X=2 TO 8
  290. 390     LOCATE X,1
  291. 391     PRINT CHR$(186)
  292. 392     LOCATE X,79
  293. 393     PRINT CHR$(186)
  294. 394   NEXT
  295. 395 '
  296. 396 ' This is the start of the opening menu selections
  297. 397 ' where you set the number of columns, printer type,
  298. 398 ' headers, footer, etc.
  299. 399 '
  300. 400 ' Defaults are:  Star/IBM Printer
  301. 401 '                Condensed print
  302. 402 '                2 columns, 8 character gutter
  303. 403 '                60 lines per page
  304. 404 '                No screen display
  305. 405 '                Print new file to disk
  306. 406 '                No header lines
  307. 407 '                One footer line with the page number
  308. 408 '
  309. 409 PRINT CHR$(200);
  310. 410 PRINT STRING$(77,205);
  311. 411 PRINT CHR$(188)
  312. 412 COLOR TA,BA
  313. 413 LOCATE 3,20
  314. 414 COLOR TB,BB
  315. 415 PRINT "Print Text Files In COLUMNS - Version 2.0"
  316. 416 COLOR TA,BA
  317. 417 LOCATE 5,5
  318. 418 PRINT "This program was originally written by Steve Rimmer of Computing Now"
  319. 419 LOCATE 6,5
  320. 420 PRINT "Magazine (March 1986 issue), and modified for flexibility and compiled"
  321. 421 LOCATE 7,5
  322. 422 PRINT "by Brian Hillis.  If you have any comments phone (416) 769-2251."
  323. 423   FOR D=1 TO 2000
  324. 424   NEXT D
  325. 425 LOCATE 11,20
  326. 426 PRINT "Which ";
  327. 427 COLOR TB,BB
  328. 428 PRINT "printer";
  329. 429 COLOR TA,BA
  330. 430 PRINT " are you using?"
  331. 431 LOCATE 12,20
  332. 432 PRINT "<";
  333. 433 COLOR TB,BB
  334. 434 PRINT "G";
  335. 435 COLOR TA,BA
  336. 436 PRINT ">emini-10 <";
  337. 437 COLOR TB,BB
  338. 438 PRINT "O";
  339. 439 COLOR TA,BA
  340. 440 PRINT ">kidata <";
  341. 441 COLOR TB,BB
  342. 442 PRINT "S";
  343. 443 COLOR TA,BA
  344. 444 PRINT ">tar-IBM"
  345. 445 LOCATE 13,20
  346. 446 PRINT "<";
  347. 447 COLOR TB,BB
  348. 448 PRINT "T";
  349. 449 COLOR TA,BA
  350. 450 PRINT ">i-855                            S";CHR$(29);
  351. 451 M$="GSOTgsot"
  352. 452 ENT=1
  353. 453 GOSUB 180
  354. 454 IF LEN(C$)<1 THEN C$="S"
  355. 455 IF C$="G" OR C$="g" THEN PR=1
  356. 456 IF C$="O" OR C$="o" THEN PR=2
  357. 457 IF C$="S" OR C$="s" THEN PR=3
  358. 458 IF C$="T" OR C$="t" THEN PR=4
  359. 459 LOCATE 15,20
  360. 460 PRINT "Which print ";
  361. 461 COLOR TB,BB
  362. 462 PRINT "pitch";
  363. 463 COLOR TA,BA
  364. 464 PRINT " do you require?"
  365. 465 LOCATE 16,20
  366. 466 PRINT "<";
  367. 467 COLOR TB,BB
  368. 468 PRINT "C";
  369. 469 COLOR TA,BA
  370. 470 PRINT ">ondensed-17cpi <";
  371. 471 COLOR TB,BB
  372. 472 PRINT "E";
  373. 473 COLOR TA,BA
  374. 474 PRINT ">lite-12cpi"
  375. 475 LOCATE 17,20
  376. 476 PRINT "<";
  377. 477 COLOR TB,BB
  378. 478 PRINT "P";
  379. 479 COLOR TA,BA
  380. 480 PRINT ">ica-10cpi                        C";CHR$(29);
  381. 481 M$="CEPcep"
  382. 482 ENT=1
  383. 483 GOSUB 180
  384. 484 IF LEN(C$)<1 THEN C$="C"
  385. 485 IF C$="C" OR C$="c" AND PR=1 THEN PW=132:PI$=ESC$+CHR$(66)+CHR$(3)
  386. 486 IF C$="E" OR C$="e" AND PR=1 THEN PW=96:PI$=ESC$+CHR$(66)+CHR$(2)
  387. 487 IF C$="P" OR C$="p" AND PR=1 THEN PW=80:PI$=ESC$+CHR$(66)+CHR$(1)
  388. 488 IF C$="C" OR C$="c" AND PR=2 THEN PW=132:PI$=CHR$(29)
  389. 489 IF C$="E" OR C$="e" AND PR=2 THEN PW=96:PI$=CHR$(28)
  390. 490 IF C$="P" OR C$="p" AND PR=2 THEN PW=80:PI$=CHR$(30)
  391. 491 IF C$="C" OR C$="c" AND PR=3 THEN PW=132:PI$=ESC$+CHR$(15)
  392. 492 IF C$="E" OR C$="e" AND PR=3 THEN PW=96:PI$=ESC$+CHR$(77)
  393. 493 IF C$="P" OR C$="p" AND PR=3 THEN PW=80:PI$=ESC$+CHR$(80)
  394. 494 IF C$="C" OR C$="c" AND PR=4 THEN PW=132:PI$=CHR$(15)
  395. 495 IF C$="E" OR C$="e" AND PR=4 THEN PW=96:PI$=ESC$+CHR$(122)
  396. 496 IF C$="P" OR C$="p" AND PR=4 THEN PW=80:PI$=ESC$+CHR$(121)
  397. 497 LOCATE 18,20
  398. 498 PRINT "How many ";
  399. 499 COLOR TB,BB
  400. 500 PRINT "columns";
  401. 501 COLOR TA,BA
  402. 502 PRINT " across the page?   2";CHR$(29);
  403. 503 M$=NU$
  404. 504 ENT=1
  405. 505 GOSUB 180
  406. 506 IF LEN(C$)<1 THEN PC=2 ELSE PC=VAL(C$)
  407. 507 LOCATE 19,20
  408. 508 PRINT "How many ";
  409. 509 COLOR TB,BB
  410. 510 PRINT "spaces";
  411. 511 COLOR TA,BA
  412. 512 PRINT " between columns?    8";CHR$(29);
  413. 513 M$=NU$
  414. 514 ENT=2
  415. 515 GOSUB 180
  416. 516 IF LEN(C$)<1 THEN PG=8 ELSE PG=VAL(C$)-1
  417. 517 LOCATE 20,20
  418. 518 PRINT "How many ";
  419. 519 COLOR TB,BB
  420. 520 PRINT "lines";
  421. 521 COLOR TA,BA
  422. 522 PRINT " per page?            60";CHR$(29);CHR$(29);
  423. 523 M$=NU$
  424. 524 ENT=2
  425. 525 GOSUB 180
  426. 526 IF LEN(C$)<1 THEN PD=60 ELSE PD=VAL(C$)
  427. 527 PDD=PD
  428. 528 LOCATE 21,20
  429. 529 COLOR TB,BB
  430. 530 PRINT "Display";
  431. 531 COLOR TA,BA
  432. 532 PRINT " assembly on screen? ";
  433. 533 COLOR TB,BB
  434. 534 PRINT "Y";
  435. 535 COLOR TA,BA
  436. 536 PRINT " or ";
  437. 537 COLOR TB,BB
  438. 538 PRINT "N";
  439. 539 COLOR TA,BA
  440. 540 PRINT "  N";CHR$(29);
  441. 541 M$="YNyn"
  442. 542 ENT=1
  443. 543 GOSUB 180
  444. 544 IF LEN(C$)<1 THEN C$="N"
  445. 545 IF C$="Y" OR C$="y" THEN D=1 ELSE D=0
  446. 546 LOCATE 22,20
  447. 547 COLOR TB,BB
  448. 548 PRINT "Output";
  449. 549 COLOR TA,BA
  450. 550 PRINT " to <";
  451. 551 COLOR TB,BB
  452. 552 PRINT "P";
  453. 553 COLOR TA,BA
  454. 554 PRINT ">rinter or <";
  455. 555 COLOR TB,BB
  456. 556 PRINT "D";
  457. 557 COLOR TA,BA
  458. 558 PRINT ">isk       D";CHR$(29);
  459. 559 M$="PDpd"
  460. 560 ENT=1
  461. 561 GOSUB 180
  462. 562 IF LEN(C$)<1 THEN PF=FALSE
  463. 563 IF C$="P" OR C$="p" THEN PF=TRUE ELSE PF=FALSE
  464. 564 LOCATE 23,20
  465. 565 PRINT "Number of ";
  466. 566 COLOR TB,BB
  467. 567 PRINT "HEADER";
  468. 568 COLOR TA,BA
  469. 569 PRINT " lines (";
  470. 570 COLOR TB,BB
  471. 571 PRINT "1";
  472. 572 COLOR TA,BA
  473. 573 PRINT " to ";
  474. 574 COLOR TB,BB
  475. 575 PRINT "5";
  476. 576 COLOR TA,BA
  477. 577 PRINT ")     0";CHR$(29);
  478. 578 M$=MID$(NU$,2,5)
  479. 579 ENT=1
  480. 580 GOSUB 180
  481. 581 IF LEN(C$)<1 THEN H=0 ELSE H=VAL(C$)
  482. 582 LOCATE 24,20
  483. 583 PRINT "Number of ";
  484. 584 COLOR TB,BB
  485. 585 PRINT "FOOTER";
  486. 586 COLOR TA,BA
  487. 587 PRINT " lines (";
  488. 588 COLOR TB,BB
  489. 589 PRINT "1";
  490. 590 COLOR TA,BA
  491. 591 PRINT " to ";
  492. 592 COLOR TB,BB
  493. 593 PRINT "5";
  494. 594 COLOR TA,BA
  495. 595 PRINT ")     0";CHR$(29);
  496. 596 M$=MID$(NU$,2,5)
  497. 597 ENT=1
  498. 598 GOSUB 180
  499. 599 IF LEN(C$)<1 THEN F=0 ELSE F=VAL(C$)
  500. 600 IF F=0 THEN AF=3 ELSE AF=0
  501. 601 IF H=0 AND F=0 THEN 636
  502. 602 IF H=0 THEN 620
  503. 603 CLS
  504. 604 LOCATE 1,1
  505. 605 PRINT "Header lines...  Type each complete header line then press [ENTER]"
  506. 606 LOCATE 3,1
  507. 607 COLOR TB,BB
  508. 608 PRINT LEFT$(RU$,PW)
  509. 609 COLOR TA,BA
  510. 610 PRINT
  511. 611   FOR X=1 TO H
  512. 612     M$=UP$+LO$+NU$+"-_./\=+* "
  513. 613     ENT=PW
  514. 614     GOSUB 180
  515. 615     IF LEN(C$)<1 THEN C$=" "
  516. 616     HL$(X)=C$
  517. 617     PRINT
  518. 618   NEXT
  519. 619 IF F=0 THEN 636
  520. 620 CLS
  521. 621 LOCATE 1,1
  522. 622 PRINT "Footer lines...  Type each complete footer line then press [ENTER]"
  523. 623 LOCATE 3,1
  524. 624 COLOR TB,BB
  525. 625 PRINT LEFT$(RU$,PW)
  526. 626 COLOR TA,BA
  527. 627 PRINT
  528. 628   FOR X=1 TO F
  529. 629     M$=UP$+LO$+NU$+"-_./\=+* "
  530. 630     ENT=PW
  531. 631     GOSUB 180
  532. 632     IF LEN(C$)<1 THEN C$=" "
  533. 633     FL$(X)=C$
  534. 634     PRINT
  535. 635   NEXT
  536. 636 CLS
  537. 637 LOCATE 1,1
  538. 638 PRINT "Name of ";
  539. 639 COLOR TB,BB
  540. 640 PRINT "source";
  541. 641 COLOR TA,BA
  542. 642 PRINT " file (Path is OK):   ";
  543. 643 M$=UP$+LO$+NU$+" .\:"
  544. 644 ENT=32
  545. 645 GOSUB 180
  546. 646 IF LEN(C$)<1 THEN 169 ELSE OPEN "I",#1,C$
  547. 647 FLN!=LOF(1)
  548. 648 IF MID$(C$,2,1)=":" THEN DR$=LEFT$(C$,2) ELSE DR$=""
  549. 649 CLS
  550. 650 RETURN
  551.